package com.osfw.activiti.service.history.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.osfw.activiti.entity.history.ActHiTaskinst;
import com.osfw.activiti.mapper.history.ActHiTaskinstMapper;
import com.osfw.activiti.service.history.IActHiTaskinstService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 历史任务表 服务层实现
 */
@Service
public class ActHiTaskinstServiceImpl extends ServiceImpl<ActHiTaskinstMapper, ActHiTaskinst> implements IActHiTaskinstService {


    @Override
    public List<ActHiTaskinst> selectHiTaskinstByExecIds(List<Long> procExecIds) {
        LambdaQueryWrapper<ActHiTaskinst> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.select(ActHiTaskinst::getProcTaskId, ActHiTaskinst::getProcExecId, ActHiTaskinst::getResult);
        queryWrapper.in(ActHiTaskinst::getProcExecId, procExecIds);
        return list(queryWrapper);
    }
}
